package JavaSEAdvance.day06_Date;

import java.time.DayOfWeek;
import java.time.LocalDateTime;

/**
 * @author Xiao
 * @date 2021/7/22
 */
public class D604_LocalDateTimeDemo01 {
    /**
     * LocalDateTime
     */
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.now();
        int year = now.getYear();
        int month = now.getMonthValue();
        int day = now.getDayOfMonth();
        int day1 = now.getDayOfYear();
        int week = now.getDayOfWeek().getValue();
        int hour = now.getHour();
        int minute = now.getMinute();
        int second = now.getSecond();
        System.out.println("今天是" + year + "年" + month + "月" + day + "日\t星期" + week);
        System.out.println("北京时间" + hour + ":" + minute + ":" + second);
        System.out.println("一年中的第" + day1 + "天。");
    }
}
